From: vhanquez@kneesa.uk.xensource.com Date: Tue, 24 Jan 2006 10:37:44 +0000 (+0000) Subject: dup and open error value is -1, not < 0 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16541^2~7 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=6ab3d2a42109645b5b3fccc8838afa0fcf9ff4dd;p=xen.git dup and open error value is -1, not < 0 Signed-off-by: Vincent Hanquez --- diff --git a/tools/xenstore/utils.c b/tools/xenstore/utils.c index 2bc40e009b..1bf8606b40 100644 --- a/tools/xenstore/utils.c +++ b/tools/xenstore/utils.c @@ -92,7 +92,7 @@ void *grab_file(const char *filename, unsigned long *size) else fd = open(filename, O_RDONLY, 0); - if (fd < 0) + if (fd == -1) return NULL; buffer = malloc(max+1);